package com.clickpaas.governmentcloud.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @company <上海爱湃斯科技有限公司>
 * @email <zhihui.peng@clickpaas.com>
 * @author huiye
 * @decription: 配置文件值设置全局变量
 * @date 2020/12/27 2:06 上午
 */
@Component
public class AutoLoadConfig {
    /**
     * 上传路径
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.FILE_PATH.MONITOR_PATH}")
    private String filePath;
    public static String FILE_PATH;

    /**
     * 文件导出路径
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.FILE_PATH.EXPORT_PATH}")
    private String exportPath;
    public static String EXPORT_PATH;

    /**
     * 匹配结果导出文件名
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.FILE_NAME.EXPORT_FILE_NAME}")
    private String exportFileName;
    public static String EXPORT_FILE_NAME;

    /**
     * 导出-匹配结果表头
     */
    //@Value("${AUTOLOAD.CONFIG_CONSTANT.HEADER.HEADER_MATCH}")
    private String[] headerMatch = {"企业名称","匹配程度","政策名称","主管部门","开始日期","结束日期","申报条件","申报入口"};
    public static String[] HEADER_MATCH;

    @PostConstruct
    public void InitConstant() {
        FILE_PATH = filePath;
        EXPORT_PATH = exportPath;
        EXPORT_FILE_NAME = exportFileName;
        HEADER_MATCH = headerMatch;
    }
}
